package ca.llsutherland.nfl.validator;

import java.util.List;

import junit.framework.TestCase;
import ca.llsutherland.nfl.domain.Person;

public class PersonValidator extends TestCase {

	public static void validate(Person expectedPerson, Person actualPerson) {
		assertEquals("same person first name", expectedPerson.getFirstname(), actualPerson.getFirstname());
		assertEquals("same person last name", expectedPerson.getLastname(), actualPerson.getLastname());
		assertEquals("same person location", expectedPerson.getLocation(), actualPerson.getLocation());
		assertEquals("same person email", expectedPerson.getEmail(), actualPerson.getEmail());
		assertEquals("same person phone number", expectedPerson.getPhoneNumber(), actualPerson.getPhoneNumber());
	}

	public static void validate(List<Person> expected, List<Person> actual) {
		int i = 0;
		
		for (Person expectedPerson : expected) {
			validate(expectedPerson, actual.get(i));
			i++;
		}
	}
	
}
